<template>
	<view class="bg">
		<z-paging ref="paging" v-model="dataList" @query="getDataListAll" :show-loading-more-no-more-view="false">
			<view slot="top">
				<u-navbar title="问卷调查" placeholder :autoBack="true" leftIconColor="#E6A5B4" bgColor="#FFFFFF"
					:titleStyle="titleStyle">
				</u-navbar>
			</view>
			<view @click="onItemClick(item)" class="itemV" v-for="(item,index) in dataList" :key="item">
				<view class="itemTv">{{item.name}}</view>
				<view class="itemTv2">{{item.user_nums}}人</view>
			</view>
		</z-paging>

		<!-- <view class="centV">
			<web-view src="https://www.wthoo.com/index.php/addons/activityform/aform?sn=wudao"></web-view>
		</view> -->
	</view>
</template>

<script>
	export default {
		data() {
			return {
				titleStyle: {
					"color": "#ffffff"
				},
				dataList: [],
			}
		},
		methods: {
			getDataListAll(pageNo, pageSize) {
				this.$api.getFormList({
					page: pageNo,
				}).then((res) => {
					this.$refs.paging.complete(res.list);
				}).catch((e) => {
					this.$refs.paging.complete(false);
				})
			},
			onItemClick(item){
				this.$u.route({
					url: '/shop/bodyBuilding/Questionnaire',
					params: {
						id: item.id
					}
				})
			}
		}
	}
</script>

<style>
	.bg {
		display: flex;
		flex-direction: column;
	}

	.centV {
		flex: 1;
		margin-left: 30rpx;
		margin-right: 30rpx;
		margin-top: 30rpx;
		margin-bottom: 30rpx;
	}
	
	.itemV{
		display: flex;
		flex-direction: column;
		background-color: #1f1f1f;
		padding: 30rpx;
		box-sizing: border-box;
		margin-bottom: 20rpx;
	}
	.itemTv{
		font-size: 32rpx;
		font-weight: 400;
		color: #fff;
		display: flex;
		align-items: center;
	}
	.itemTv2{
		color: #8d8d8d;
		font-size: 26rpx;
		font-weight: 400;
		margin-top: 10rpx;
	}
</style>